"""
日志页面
"""
from pages.base_page import BasePage
from selenium.webdriver.common.by import By


class LogHomePage(BasePage):
    url = '/crm/index.php?m=log'
    add_log_locator = (By.XPATH, '/html/body/div[5]/div[2]/div[2]/div/a')
    add_ok_locator = (By.CSS_SELECTOR,'body > div.container > div.alert.alert-success')
    #点击新增日志
    def btn_add_log(self):
        self.driver.find_element(*self.add_log_locator).click()

    #添加成功断言
    def add_log_ok(self):
        return self.driver.find_element(*self.add_ok_locator).text

